const { resolve } = require("path");
const {
  override,
  addDecoratorsLegacy,
  addWebpackAlias,
  fixBabelImports,
} = require("customize-cra");

module.exports = override(
  //装饰器
  addDecoratorsLegacy(),
  //路由别名
  addWebpackAlias({
    "@": resolve("./src"),
  }),
  //antd-mobile样式按需引入
  fixBabelImports("import", {
    libraryName: "antd-mobile",
    style: "css",
  })
);
